package team.xiaobaiya.gptchatrobot.rights;

public enum UserKeyCheckResult {
    USER_KEY_OK(0, null),
    USER_KEY_EMPTY(1, "UserKey为空"),
    USER_KEY_INVALID(2, "UserKey无效"),
    USER_KEY_USAGE_INSUFFICIENT(3, "积分不足"),
    USER_KEY_ON_LOADING(4, "UserKey在占用");


    public final int code;
    public final String msg;

    UserKeyCheckResult(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * 检查不通过
     * @return 是否不通过
     */
    public boolean notOk() {
        return code != 0;
    }
}
